/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufba.lasid.v1.jitclouds.mda.datatypes;

import br.ufba.lasid.v1.jitclouds.mda.datatypes.virtualization.INode;
import java.util.ArrayList;
import java.util.Collection;

/**
 *
 * @author aliriosa
 */
public class BasicCluster extends ArrayList<INode> implements ICluster{
    private String idCluster = null;
    private String address = null;
    private ResourceList resources = null;
    private String dsCluster = null;

    
    public BasicCluster() {
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDsCluster() {
        return dsCluster;
    }

    public void setDsCluster(String dsCluster) {
        this.dsCluster = dsCluster;
    }

    public String getIdCluster() {
        return idCluster;
    }

    public void setIdCluster(String idCluster) {
        this.idCluster = idCluster;
    }
    
        
    public ResourceList getResources() {
        return resources;
    }

    public void setResources(ResourceList resources) {
        this.resources = resources;
    }
    private IDataCenter dc = null;
    
    @Override
    public void setID(String clusterID) {
        this.idCluster = clusterID;
    }

    @Override
    public String getID() {
        return this.idCluster;
    }

    @Override
    public void setDescription(String description) {
        this.dsCluster = description;
    }

    @Override
    public String getDescription() {
        return this.dsCluster;
    }

    @Override
    public void setDataCenter(IDataCenter dc) {
        this.dc = dc;
    }

    @Override
    public IDataCenter getDataCenter() {
        return this.dc;
    }

    @Override
    public void addNode(INode node) {
        node.setCluster(this);
        add(node);
    }
    
    public void debug(){
        System.out.println("Cluster id: " + idCluster);
        System.out.println("Cluster address: " + address);
        
    }
        
}
